<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Dashboard">
<meta name="keyword"
	content="Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">

<title>后台管理系统</title>

<!-- Bootstrap core CSS -->
<link href="/admin/resources/css/common/bootstrap.css"
	rel="stylesheet">
<link href="/admin/resources/css/common/jquery-confirm.css"
	rel="stylesheet">
<!--external css-->
<link href="/admin/resources/font-awesome/css/font-awesome.css"
	rel="stylesheet" />

<!-- Custom styles for this template -->
<link href="/admin/resources/css/common/style.css" rel="stylesheet">
<link href="/admin/resources/css/common/style-responsive.css"
	rel="stylesheet">

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body style="overflow:auto;overflow-x: hidden">

	<section id="container">
		<!-- **********************************************************************************************************************************************************
      TOP BAR CONTENT & NOTIFICATIONS
      *********************************************************************************************************************************************************** -->
		<!--header start-->
		<header class="header black-bg">
			<div class="sidebar-toggle-box">
				<div class="fa fa-bars tooltips" data-placement="right"
					data-original-title="隐藏菜单栏"></div>
			</div>
			<!--logo start-->
			<a href="index.html" class="logo"><b>后台管理系统</b></a>
			<!--logo end-->
			<div class="top-menu">
				<ul class="nav pull-right top-menu">
					<li><a class="logout" id="changepwd" href="javascript:void(0)">修改密码</a></li>
					<li><a class="logout" href="/admin/user/loginOut">注销</a></li>
				</ul>
			</div>
		</header>
		<!--header end-->

		<!-- **********************************************************************************************************************************************************
      MAIN SIDEBAR MENU
      *********************************************************************************************************************************************************** -->
		<!--sidebar start-->
		<aside id="menu"></aside>
		<!--sidebar end-->

		<!-- **********************************************************************************************************************************************************
      MAIN CONTENT
      *********************************************************************************************************************************************************** -->
		<!--main content start-->
		<section id="main-content">
			<section class="wrapper site-min-height">
				<div class="row content-tabs">
                <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
                </button>
                <nav class="page-tabs J_menuTabs">
                    <div class="page-tabs-content" style="margin-left: 0px;">
                    	<a href="javascript:;" class="J_menuTab" data-id="index_v1.html">首页</a>
                    </div>
                </nav>
                <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i>
                </button>
                <div class="btn-group roll-nav roll-right">
                    <button class="dropdown J_tabClose" data-toggle="dropdown" aria-expanded="false">关闭操作<span class="caret"></span>

                    </button>
                    <ul role="menu" class="dropdown-menu dropdown-menu-right">
                        <li id="J_tabShowActive"><a>定位当前选项卡</a>
                        </li>
                         <li class="divider"></li>
                        <li id="J_tabCloseAll"><a>关闭全部选项卡</a>
                        </li>
                         <li class="divider"></li>
                        <li id="J_tabCloseOther"><a>关闭其他选项卡</a>
                        </li>
                    </ul>
                </div>
                <a href="javascript:void()" onClick="refreshActive();" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-refresh"></i> 刷新</a>
            </div>
            <!-- 用于保存goodsIndex.html翻到了第几页 -->
            <input id="pagerecord" value="" type="hidden"/>
            <div id="iframContent" class="row"></div>
			</section>
			<! --/wrapper -->
		</section>
		<!-- /MAIN CONTENT -->
	</section>
	<!--main content end-->
	<!--footer start-->
	<div id="footer"></div>
	<!--footer end-->
	
	
	<div class="modal fade" id="info_model" role="dialog" aria-labelledby="paysuccess" aria-hidden="true">
		<div class="modal-dialog-s">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title">修改密码</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" role="form" id="param_form" action="">
						<div class="form-group">
							<label for="" class="col-sm-4 control-label">原始密码</label>
							<div class="col-md-8 col-sm-8">
								<input type="password" class="form-control" name="importOldPassword" placeholder="请输入原始密码" value="">
							</div>
						</div>
						<div class="form-group">
							<label for="" class="col-sm-4 control-label">新密码</label>
							<div class="col-md-8 col-sm-8">
								<input type="password" class="form-control" name="importNewPassword" placeholder="请输入新密码" value="">
							</div>
						</div>
						<div class="form-group">
							<label for="" class="col-sm-4 control-label">重复新密码</label>
							<div class="col-md-8 col-sm-8">
								<input type="password" class="form-control" name="reNewPassword" placeholder="重复新密码" value="">
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" id="close-btn"
						data-dismiss="modal">关闭窗口</button>
					<button type="button" class="btn btn-success" id="submit-btn">提交</button>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal -->
	</div>
	
	<!-- js放在文件末端以便页面更快地加载 -->
	<script src="/admin/resources/js/common/jquery.js"></script>
	<script src="/admin/resources/js/common/bootstrap.min.js"></script>
	<script src="/admin/resources/js/common/bootstrapValidator.js"></script>
	<script class="include" type="text/javascript" src="/admin/resources/js/common/jquery.dcjqaccordion.2.7.js"></script>
	<script src="/admin/resources/js/common/jquery.scrollTo.min.js"></script>
	<script src="/admin/resources/js/common/jquery.nicescroll.js" type="text/javascript"></script>
	<script src="/admin/resources/js/common/jquery-confirm.min.js"></script>
	<script src="/admin/resources/js/common/jquery.json-2.4.min.js"></script>
	<script src="/admin/resources/js/common/cropbox.js"></script>
	<script src="/admin/resources/js/common/base.js"></script>

	<script type="text/javascript">
		$("#footer").html(footer);
		loadMenu(true);
		
		$("#changepwd").click(function() {
			var model = $("#info_model");
			model.modal({
				keyboard : false
			});//配置模态框
		});
		
		$("#submit-btn").click(function(){
			var params = {};
			$("#info_model input[name]").each(function(index, element){
				var key = $(element).attr("name");
				var value = $(element).val();
				params[key] = value;
			});
			if(params["importNewPassword"] != params["reNewPassword"]) {
				jsalert("新密码和重复新密码不符合", "exception");
				return;
			}
			$.post("/admin/user/changePassword", params, function(resp) {
				if (resp.result == '00') {
					$.confirm({
						title: '操作成功',
						content: '密码修改成功,请重新登录。',
						autoClose: 'confirm|3000',	
						confirm: function(){
							window.location.href = "/admin/web/user/login.html";
						}
					});
				} else {
					jsalert(resp.message);
				}
			}, 'json');
		});
		
	</script>

</body>
</html>
